//
//  StoryViewController.m
//  宝宝儿歌
//
//  Created by Clement_Gu on 16/4/25.
//  Copyright © 2016年 baobaoerge. All rights reserved.
//

#import "StoryViewController.h"
#import "StoryIcon.h"
#import "StoryListController.h"
@interface StoryViewController ()<StoryIconDelegate>

@end

@implementation StoryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    CGFloat width = [UIScreen mainScreen].bounds.size.width;
    CGFloat height = [UIScreen mainScreen].bounds.size.height;
    CGFloat navHeight = self.navigationController.navigationBar.bounds.size.height;
  
    

    

   [self buildAllControl:CGRectMake(0, navHeight + 10, width*0.5, (height- navHeight*2-20)*0.5)];
    [self buildAllControl:CGRectMake(width*0.5, navHeight + 10 , width*0.5, (height- navHeight*2-20)*0.5)];
    [self buildAllControl:CGRectMake(0, navHeight + 10 +(height- navHeight*2-20)*0.5, width*0.5, (height- navHeight*2-20)*0.5)];
    [self buildAllControl:CGRectMake(width*0.5, navHeight + 10 +(height- navHeight*2-20)*0.5, width*0.5, (height- navHeight*2-20)*0.5)];
   
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void)buildAllControl:(CGRect)frame
{
    StoryIcon *stView = [[StoryIcon alloc]initWithFrame:frame];
    stView.delegate = self;
    [self.view addSubview:stView];
    

}
-(void)btnClickWillPress
{
    StoryListController *VC = [[StoryListController alloc]init];
    [self.navigationController pushViewController:VC animated:YES];
    
}

@end
